/**枚举 */
var Directions;
(function (Directions) {
    Directions[Directions["Up"] = 0] = "Up";
    Directions[Directions["Down"] = 1] = "Down";
    Directions[Directions["Left"] = 2] = "Left";
    Directions[Directions["Right"] = 3] = "Right";
})(Directions || (Directions = {}));
console.log(Directions.Up);
console.log(Directions.Down);
console.log(Directions.Left);
console.log(Directions.Right);
// 枚举的默认值 从零开始 递增加一
// 可以赋默认值，再此基础之上递增加一
// 数字枚举具有反向映射的特点，字符串枚举则没有
